A compressor having a rotating shaft on which a swash plate is fixed and a piston functionally connected to the swash plate so that the piston reciprocates within a cylinder block has been known as a swash plate compressor. Such swash plate compressor has been used as a refrigerant compressor of an automotive air conditioner. The automotive refrigerant compressor is driven by an automotive engine through a belt which also drives a water pump and an generator. When the compressor causes some damages to the belt, the generator and the water pump cannot work. In order to protect such trouble, the compressor employs a rotation detector which finds whether the compressor rotates or not, and the detector outputs the signal for not transmitting the driving force from the belt to the compressor when the detector finds that the compressor cannot be rotated smoothly. The conventional type compressor employs a concave portion on an outer surface of a piston as a detective portion and an electromagnetic sensor as a detector provided on a cylinder block in such a manner that the electromagnetic sensor faces to the concave portion at least once while the piston reciprocates. The electromagnetic sensor generates a pulse in accordance with the movement of the concave portion so that the rotating detector finds the condition of the compressor having a trouble when the electromagnetic sensor detects no pulse.
The concave portion is formed on a skirt portion of the piston. Therefore, the length of the skirt portion must be shortened in order to form the concave portion therein, so that a sealing effect of the skirt portion should be decreased. The electromagnetic sensor of the conventional type detector should be mounted on the cylinder block close to the skirt portion of the piston Since the atmosphere around the skirt portion of the piston is high temperature, the electromagnetic sensor may be caused a kind of a thermal damage.